/**
 * Copyright (c) 2008 Jeff Backus.
 *
 * Licensed under the GNU General Public License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Additionally, this code makes heavy use of the Qt libraries from
 * Trolltech.  These libraries are released under the GNU
 * General Public License, Version 2.0, as well.  Please contact
 * Trolltech for more information.
 *
 *     http://trolltech.com/
 * 
 */

/**
 * This class is the Split Rows/Columns dialog used by the
 * IndexedPaletteEditorTableWidget.
 */

#ifndef __INDEXEDPALETTEEDITORTABLEWIDGETSPLITDLG_H__
#define __INDEXEDPALETTEEDITORTABLEWIDGETSPLITDLG_H__

#include <QDialog>
#include <QSpinBox>

class IndexedPaletteEditorTableWidgetSplitDlg : public QDialog {

	Q_OBJECT

public:
	// If start == stop, box is disabled.
	IndexedPaletteEditorTableWidgetSplitDlg(int startX, int stopX, int startY, int stopY, QWidget* parent = 0, Qt::WindowFlags f = 0);

	// get coordinates.  Returns -1 if invalid.
	int getX();
	int getY();

public slots:
	void cancelClicked(bool checked = false);
	void okClicked(bool checked = false);

private:
	int _x;
	int _y;
	int _startX;
	int _startY;
	int _stopX;
	int _stopY;
	
	QSpinBox* _xBox;
	QSpinBox* _yBox;

};

#endif
